package cn.ttxs.wq.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

import cn.ttxs.wq.R;

/***
 * Created by wq
 *on 2020/6/10
 * des:
 */
public class CustomerAdapter extends BaseQuickAdapter<String, BaseViewHolder> {


    public CustomerAdapter(int layoutResId, @Nullable List<String> data) {
        super(layoutResId, data);
    }

    /**
     * 在此方法中设置item数据
     */
    @Override
    protected void convert(@NotNull BaseViewHolder helper, @NotNull String item) {
        helper.setText(R.id.tv_content, item + "\tpos: " + (helper.getAdapterPosition() - getHeaderLayoutCount()));
    }
}
